#!/bin/sh
aria2c -x 16 -s 16 -d /opt/apps/deepin-wine-runner-virtual-machine -o window.7z https://code.gitlink.org.cn/gfdgd_xi/wine-runner-virtual-machine-system/raw/branch/master/windows7_32.7z
7z x -o/opt/apps/deepin-wine-runner-virtual-machine /opt/apps/deepin-wine-runner-virtual-machine/window.7z
rm /opt/apps/deepin-wine-runner-virtual-machine/window.7z
# 安装服务应用
spark-deepin-wine-runner-vm-run
spark-deepin-wine-runner-vm-installprogram /opt/apps/deepin-wine-runner-virtual-machine/server.exe
#spark-deepin-wine-runner-vm-poweroff
# 设置目录权限，让用户可读可写，方便后续进行操作
chmod 777 -R /opt/apps/deepin-wine-runner-virtual-machine
# 向服务器返回安装数加1（不显示内容且忽略错误）
curl https://304626p927.goho.co/spark-deepin-wine-runner/Install.php?Version=2.1.0-2 -s > /dev/null | true
